<!DOCTYPE html>
<html>
<head>
<title>Spinner Exitren</title>
  
<script type='text/javascript'>
//<![CDATA[
function filterText(sText) {
    return sText
        .replace(/amazon/ig, "wedus")
}
function showText() {
    var oInput1 = document.getElementById("txt1");
    var oInput2 = document.getElementById("txt2");
    oInput2.innerHTML = filterText(oInput1.value);
} showText();
//]]>  
</script>
</head>
<body>
<h2>Formulir</h2><textarea id="txt1" onkeyup="showText();"></textarea>
<h2>Tampilan</h2><div id="txt2"></div>
  
</body>
</html>